import { ECSEntity } from 'db://app-game/libs/ecs/ECSEntity';
import BTAction from 'db://app-game/libs/math/behavior-tree/base/BTAction';
import { NodeStatus } from 'db://app-game/libs/math/behavior-tree/enum';
import { RandomMoveModelComp } from '../../ecs/base/bll/move/randomMoveSystem';

/**
 * 随机移动
 *
 * 1. 随机移动
 * 2. 移动完成
 */
export default class ActionRandomMove extends BTAction {
  onUpdate(entity: ECSEntity): NodeStatus {
    entity.add(RandomMoveModelComp);
    return NodeStatus.Success;
  }
}
